import request from '@/utils/request'

// 查询培训经历列表
export function listTrain(query) {
  return request({
    url: '/train/train/list',
    method: 'get',
    params: query
  })
}

// 查询培训经历详细
export function getTrain(id) {
  return request({
    url: '/train/train/' + id,
    method: 'get'
  })
}

// 新增培训经历
export function addTrain(data) {
  return request({
    url: '/train/train',
    method: 'post',
    data: data
  })
}

// 修改培训经历
export function updateTrain(data) {
  return request({
    url: '/add/add/update4',
    method: 'put',
    data: data
  })
}

// 删除培训经历
export function delTrain(id) {
  return request({
    url: '/train/train/' + id,
    method: 'delete'
  })
}

// 输入账号，获取人名
export function getFirefighterIdCard(idCardNumber) {
  return request({
    url: '/add/add/firefighterIdCard',
    method: 'post',
    data: {
      idCardNumber: idCardNumber
    }
  })
}
// 批量添加
export function addTrainList(data) {
  return request({
    url: '/add/add/train',
    method: 'post',
    data: data
  })
}